<template>
	<view class="container">
		<uni-card is-full>
			<text class="uni-h6">按阶段进行基础练习，测试，检测基础能力。</text>
		</uni-card>
		<uni-section :title="item.name" type="line"   v-for="(item,index) in course" :key="index">
			<view class="example-body">
				<view class="tag-view">
					<uni-tag :text="item1.name" type="primary" size="normal" class="tag-view-item"  v-for="(item1,index1) in item.lesson" :key="index1" @click="dotest(item1.id)"/>
				</view>
			</view>
		</uni-section>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				type: "default",
				inverted: false,
				course:[
					{
					name:"Professional Senior 1",
					lesson:[
					{
						name:"第一单元",
						id:"sdfdsff"
					}
					]
					}
				]
			};
		},
		methods: {
			dotest(id) {
				console.log("1234")
				uni.navigateTo({
					url:'/pages/exam/exam',
					fail(error){
						console.log(error)
					}
				})
			},
		},
	};
</script>

<style lang="scss">
	.example-body {
		/* #ifndef APP-PLUS-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		justify-content: flex-start;
		align-items: flex-end;
		flex-wrap: wrap;
	}

	.tag-view {
		margin: 10px;
	}
	.tag-view-item {
		margin: 5px;
	}
</style>
